﻿#ifndef FILESTORAGECONTROLLER_H
#define FILESTORAGECONTROLLER_H

#include <httprequesthandler.h>
using namespace stefanfrings;

class FileStorageController : public HttpRequestHandler
{
public:
    FileStorageController(QObject *parent = nullptr);
    ~FileStorageController();
    void service(HttpRequest &request, HttpResponse &response) override;
private:
    void list(HttpRequest &request, HttpResponse &response); //获取文件列表
    void info(HttpRequest &request, HttpResponse &response); //获取文件信息
    void write(HttpRequest &request, HttpResponse &response); //写入数据
    void read(HttpRequest &request, HttpResponse &response); //读取数据
    void download(HttpRequest &request, HttpResponse &response);//下载文件
    void deleteFile(HttpRequest &request, HttpResponse &response);//删除文件
};

#endif // FILESTORAGECONTROLLER_H
